<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>学生管理</title>
<link rel="stylesheet" href="css/manage.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/footer.css" type="text/css">

</head>
<body style="background-color:#eee;">
	<%@ include file="/module/top.jsp"%>
	<div class="container" style="background-color: #ffffff;">
		<div class="row">
			<h3 class="text-center" style="margin-bottom: 20px;">修改数据</h3>
			<div class="col-sm-12 center-block">
				<form class="form-horizontal" role="form" id="edit_admin"
					name="edit_admin" action="edit_admin.jsp" method="post">
					<div class="form-group">
						<label for="inputText1" class="col-sm-2 control-label" id="la">要修改的姓名</label>
						<div class="col-sm-10">
							<select name="market_id" class="form-control" id="inputText1">
								<%
									String driverClass = "com.mysql.jdbc.Driver";
									String url = "jdbc:mysql://localhost:3306/detecting_system?useUnicode=true&characterEncoding=utf-8";
									String user = "root";
									String password = "";
									ResultSet rs = null;
									Connection conn = null;
									PreparedStatement sql = null;
									try {
										Class.forName(driverClass);
										conn = DriverManager.getConnection(url, user, password);
										Statement stmt = conn.createStatement();
										sql = conn.prepareStatement("select * from market_data");
										rs = sql.executeQuery();
										while (rs.next()) {
								%>
								<option value="<%=rs.getString(1)%>"><%=rs.getString(1)%></option>
								<%
									}
									} catch (Exception ex) {
										ex.printStackTrace();
									}
								%>
								<%
									sql.close();
									rs.close();
									conn.close();
								%>

							</select>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-primary pull-right">选择</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
	<script src="js/bootstrap.js" type="text/javascript"></script>
</body>
</html>